//
//  ChatViewController.h
//  TIMChat
//
//  Created by AlexiChen on 16/2/23.
//  Copyright © 2016年 AlexiChen. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MicroVideoView.h"
#import "MyChatToolBarView.h"
#import "CLSafeMutableArray.h"
#import "TableRefreshViewController.h"

typedef NS_ENUM(NSInteger, SendInputStatus)
{
    SendInputStatus_notSend = 0,
    SendInputStatus_Send,
};
@class MyChatToolBarView;

@interface ChatViewController : TableRefreshViewController<MyChatToolBarViewDelegate, MyMoreViewDelegate, MicroVideoDelegate>
{
@protected
    IMAConversation                     *_conversation;
    IMAUser                             *_receiver;
    FBKVOController                     *_receiverKVO;
    
    __weak CLSafeMutableArray           *_messageList;
    
@protected
    MyChatToolBarView                   *_toolbar;
    SendInputStatus                     _sendInputStatus;
    NSTimer                             *_inputStatusTimer;
    
}

@property (nonatomic, assign) BOOL    isback;


//接收方是否是主播
@property (nonatomic, copy) NSString                       *isAnchor_rec;

- (instancetype)initWith:(IMAUser *)user;

- (void)configWithUser:(IMAUser *)user;

- (void)modifySendInputStatus:(SendInputStatus)status;

- (void)addChatSettingItem;
- (void)onClickChatSetting;


// 加载历史信息
- (void)loadHistotyMessages;

// 添加收到的信息
- (void)appendReceiveMessage;

- (void)sendMsg:(IMAMsg *)msg;

- (void)updateOnSendMessage:(NSArray *)msglist succ:(BOOL)succ;

- (void)moreViewMoneyImageAction;
- (void)moreViewMoneyVideoAction;
- (void)moreViewFreeImageAction;
- (void)moreVideChatVideoAction;
- (void)moreVideChatVoiceAction;
- (void)moreVideFlowerAction;


/**
 判断是否是主播
 
 @param complete 获取成功
 */
-(void)getIsAnchorWithUserID:(NSString *)userID Complete:(void(^)(NSString * isAnchor))complete;



@end
